#include <src/test/algorithm/1DSolvers/Newton_Raphson_test.h>

	
void newton_raphson_test()
{
	std::cout << std::endl << "----start newton_raphson_example---------------------" << std::endl;
    I1_aux::traits_type::rounding rnd;
	typedef newton_raphson_example<I1> test_struct; 

	typedef test_struct::f function_type; 
	function_type function;
    std::vector<I1> res = newton_raphson(function, I1(-10, 10));
    std::cout << "\n Zeros of x * (x - 1.) * (x - 2.) * (x - 3.) * (x - 4.): classical definition \n" << std::endl << std::setprecision(12);
    std::cout << res << std::endl;

	typedef test_struct::test_polynomial_algebra polynomial_type; 
	polynomial_type polynomial;
    std::cout << "\n Zeros of x * (x - 1.) * (x - 2.) * (x - 3.) * (x - 4.) using polynomial algebra class \n" << std::endl << std::setprecision(12);
	res = newton_raphson(polynomial, I1(-10, 10));
    std::cout << res << std::endl;
	std::cout << std::endl << "----end newton_raphson_example---------------------" ;
	std::cout << std::endl << "------------------------------------------------" << std::endl;
};
